﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CommonGameClasses;

namespace BattleLogic
{
	public class Bullet : LogicObject, IBullet
	{

		public new string Name { get; set; }
		public new double PositionX { get; set; }
		public new double PositionY { get; set; }
		public new double Radius { get { return 8.0f; } }
		public new double Rotation { get; set; }
		public new TypeWorldObjects TypeWorldObject { get { return TypeWorldObjects.Bullet; } }
		
		public double MoveSpeed { get { return 0.1; } }
		public short Power { get; private set; }

		public Bullet(short power)
		{
			this.Name = "Bullet";
			this.Power = power;	
		}

		public override void Update(double deltaTime)
		{
			this.PositionX += this.MoveSpeed * deltaTime * Math.Cos(this.Rotation);
			this.PositionY += this.MoveSpeed * deltaTime * Math.Sin(this.Rotation);
		}
	}
}
